Skip to content

fix(kge): fail closed on invalid strict benchmark evidence - #1213

Closed
ruvnet wants to merge 11 commits into
fix/kge-required-engine-20261013from
fix/kge-strict-evidence-20261013
Closed

ruvnet wants to merge 11 commits into
fix/kge-required-engine-20261013from
fix/kge-strict-evidence-20261013

Conversation

@ruvnet

@ruvnet ruvnet commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Adds an opt-in --gate --strict-evidence mode on top of #1208. It hardens reproduced fail-open paths without changing default, --require-engine, or report-only compatibility. The PR remains draft while exact-head validation and additional source-review findings are unresolved.

Reproduced with verified executor exit 0: at #1208 head 18889bb, training error hidden by successful evaluation, null/nonfinite ranking metrics accepted, requested ANN arm skipped, and incompatible dataset baseline identity accepted. At the initial #1213 head a2c5dbf, a baseline with identical data hashes but mismatched scorer and training config was still accepted as model-shape compatible.

Strict evidence now requires: engine evaluation, completed requested training with finite telemetry, finite bounded filtered head/tail metrics for every populated split, successful execution of every explicitly requested optional arm, and compatible baseline schema, suite, scorer, full recorded config, tie mode, dataset split and file hashes, with finite transfer MRR when a baseline is supplied. Backend identity is not forced.

At head 7162f13, 28 benchmark tests passed and the native mismatched baseline correctly failed, but a subsequent native matrix found that an exact baseline also failed because the scorer was compared against an internal run object without that field. Current head 7f4ad4e compares the baseline against the requested scorer/config and adds an exact-baseline positive regression. GitHub regression guard is green; Clippy and Workspace CI are still active. The exact-head executor replay timed out without verified structured completion, so the current head is not yet locally validated or merge-ready.

Read-only review also identified unverified strict-mode risks: a requested tie check may SKIP while strict mode passes; adversarial retraining errors may be discarded; and baseline input can be accepted when no transfer split exists. These need reproduction before further fixes. No package release is needed for bench-only files. No merge requested. Broader CI security/link/test blockers reported on #1208 remain separate and unresolved.

ruvnet commented Oct 13, 2026

Copy link
Copy Markdown
Owner Author

Final bounded campaign validation — exact head 39a4977a5801c85e5d7f3d98e4f1e181cb4dd7b6

Reproduced the adversarial retraining fail-open at prior head 0a2aec5: force the second trainJson call to return incremental retraining failed; the harness still emitted a finite 0.030 drop, strict_requested_arms PASS, overall PASS, and actual exit 0 (0.690 s).

The narrow fix now checks the incremental train() result and records a skipped adversarial arm when retraining is unavailable. The same injected failure at the exact head records incremental retraining unavailable: incremental retraining failed, strict_requested_arms FAIL, overall FAIL, and actual benchmark exit 1 (0.741 s).

Exact-head executor evidence:

  • fetched clean on Software Factory executor 815601f9e17de8
  • git diff --check: pass
  • node --check npm/packages/kge/bench/run.mjs: pass
  • node --test npm/packages/kge/test/bench.test.mjs: 30/30 pass
  • structured executor completion verified, wrapper exit 0; checkout clean

Real published native binding check (@ruvector/kge@0.2.0, engine 2.4.0) completed the adversarial arm but correctly failed its scientific gate: confidence drop -0.1585394591, actual CLI exit 1. This is evidence of a failed gate, not a harness regression or transfer gain.

Fresh workflows 38377557699, 38377557711, and 38377557695 are active, so this remains draft and is not claimed merge-ready. Prior-head regression guard and Clippy/fmt were green; prior Workspace CI was superseded/cancelled after showing the same inherited Rust/security failures. No merge, release, rerun, waiver, or package publication performed.

Remaining disclosed gap: strict baseline comparison without a transfer split is source-reviewed but was not executed or patched in this bounded campaign.

@ruvnet

ruvnet commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Landed on main via #1477 (merge 73ba91f). This PR's 11 commits were squashed and ported from #1208's branch onto main. Bench contract tests pass 30/30. The disclosed gap is carried over in that PR: strict baseline comparison with no transfer split has no test yet. Closing as superseded.

@ruvnet ruvnet closed this Nov 10, 2026
vitaly-z pushed a commit to vitaly-z/ruvector that referenced this pull request Nov 11, 2026
Adds opt-in `--gate --strict-evidence` to bench/run.mjs on top of
`--require-engine` (ruvnet#1461). Default, `--require-engine` and `--report-only`
behavior are unchanged.

Strict evidence requires: engine evaluation; completed requested training
with finite telemetry; finite, bounded filtered head/tail metrics for every
populated split; successful execution of every explicitly requested optional
arm (ANN, tie check, adversarial retraining, whose train() errors are no
longer discarded); and, when a baseline is supplied, a compatible schema,
suite, requested scorer, full recorded config, tie mode, dataset split and
file hashes, plus finite transfer MRR.

Ported from ruvnet#1213 (11 commits stacked on ruvnet#1208's branch, which landed as
ruvnet#1461) onto main. Bench contract tests: 30/30 (22 existing + 8 strict).
Full kge suite: 0 failures, same 24 engine-absent skips as main.

Known gap carried from ruvnet#1213: strict baseline comparison when the dataset
has no transfer split is source-reviewed but not exercised by a test.

Co-Authored-By: claude-flow <ruv@ruv.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant